/* 
 * File:   Main2.cpp
 * Author: Guilherme Monteiro
 *
 */

#include <cstdlib>
#include <exception>
#include <cerrno>
#include <cstdio>
#include <string>

#include "../../TableTranscriber2/headers/GenericAdapter.h"
#include "../../TableTranscriber2/headers/FileWriter.h"
#include "../headers/ZoomingSelector.h"

using namespace std;

/*
 * Main2 to test ZoomingSelector
 */
//int main(int argc, char** argv) {
//    try {
//        string highTablePath = "/books/estatisticas/metadados/tabelasAlta/image62_0.png";
//        MetaInfoZooming* meta = new MetaInfoZooming(highTablePath);
//        
//        ZoomingSelector* zoomingSelector = new ZoomingSelector(meta->getHighResolutionTablePath());
//        vector<Cell> selections = zoomingSelector->run();
//        
//        GenericAdapter* genericAdapter = new GenericAdapter(HIGH_2_LOW, meta);
//        vector<Cell> selectionsAdapted = genericAdapter->adaptCells(selections);         
//
//        FileWriter* fileWriter = new FileWriter(meta->getOutputSelectionsFileName());
//        fileWriter->writeHeader1(cvPoint(0,0), cvPoint(DEFAULT_WIDTH, DEFAULT_HEIGHT));
//        fileWriter->writeCells(selectionsAdapted);
//        
//        cout << "====> ZoomingSelector executed with success." << endl;  
//    }
//    catch(exception &e) {
//        cerr << e.what() << endl;
//    }
//        
//    return 0;
//}

